#ifndef __SIGNAL_ANALYSE_H
#define __SIGNAL_ANALYSE_H

#define SAMPLE_FREQ 8000
#define PREC_CTRL 32768



typedef struct
{
	float fr;
	float snr;
	float thd;
	int freq;
}S_AUDIO_PAR, *PS_AUDIO_PAR;

typedef struct
{
	char name[32];
	int freq;
//	long int freq_power;
	S_AUDIO_PAR in_par;
	S_AUDIO_PAR out_par;
}S_AUDIO_UNIT, *PS_AUDIO_UNIT;

int audio_device_init();
int audio_read(short *sample_a, int power, int flag);
int audio_write(char *name);
int audio_analyse(PS_AUDIO_PAR pstAudio_par, short *sample_a, int power);
int audio_read_file(char *name, short *sample_a, int power);
int cal_noise(int power);
int audio_noise_play();





#endif
